package com.sgj.test;

import org.quartz.Job;
import org.quartz.JobExecutionContext;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

/**
 * @Author: Guoji Shen
 * @Date: 2021/11/23 9:41
 */
public class PrintWordsJob implements Job {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) {
        String printTime = new SimpleDateFormat("yy-MM-dd HH-mm-ss").format(new Date());
        System.out.println("定时任务 开始 于:" + printTime + ", 输出: 你好 Job-" + new Random().nextInt(100));
    }
}